import cv2
img=cv2.imread('./static/2.JPG',cv2.IMREAD_GRAYSCALE)
cv2.imwrite('jpg1.png',img)